package com.xjl.javacore.code.throwable;

import lombok.extern.slf4j.Slf4j;

/**
 * 自定义断言码
 * @author xiaojinlu1990@163.com
 * date 2020-01-16
 */
@Slf4j
public class AssertUtil {


    public static void assertTrue(boolean cond,String message) {
        if (cond) {
            log.info("errorCode : -1  message :{}", message);
            new RunTimeExceptionExample("-1", message);
        }
    }
    public static void assertTrue(boolean cond,String resultCode,String message){
        if (cond) {
            log.info("resultCode : {} message :{}", resultCode, message);
            new RunTimeExceptionExample(resultCode, message);
        }
    }

}
